package com.lp.biz.content.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static com.lp.common.constant.CommonConstant.DATE_TIME;
import static com.lp.common.constant.CommonConstant.TIMEZONE;

/**
 * @program: backend
 * @description:
 * @author: Ke.Song
 * @since: 2024-06-05 20:06:44
 */
@Data
public class Daily {

    private Integer id;

    @NotBlank(message = "标题不能为空")
    private String title;

    @NotBlank(message = "音频不能为空")
    private String audioUrl;

    @NotBlank(message = "图文详情不能为空")
    private String profile;

    private String content;

    private Integer sort;

    @NotBlank(message = "时长不能为空")
    private String duration;

    @NotNull(message = "上架类型不能为空")
    private Integer displayType;

    @JsonFormat(pattern = DATE_TIME, timezone = TIMEZONE)
    private LocalDateTime displayAt;

    private String image;
}
